package com.csun.cmny.provider.model.dto;

import com.csun.cmny.provider.validator.OmcOldManSupValidator;
import lombok.Data;
import org.hibernate.validator.constraints.NotEmpty;
import org.hibernate.validator.constraints.Range;

import javax.persistence.*;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.util.Date;

@Data
public class OmcOldManSupplementDto {
    /**
     * 老人补充表Id
     */
    private Long  id;

    /**
     * 版本号
     */
    private Integer version;

    /**
     * 老人Id
     */
    private Long oldManId;

    /**
     * 组织Id
     */
    private Long groupId;

    /**
     * 药物过敏史
     */
    @NotEmpty(message="{OldMan.guoyinshi.notnull}",groups={OmcOldManSupValidator.class})
    @Size(min=1,max=512,message="{OldMan.guoyinshi.length}",groups={OmcOldManSupValidator.class})
    private String dHistory;

    /**
     * 既往病史
     */
    @NotEmpty(message="{OldMan.bingshi.notnull}",groups={OmcOldManSupValidator.class})
    @Size(min=1,max=128,message="{OldMan.bingshi.length}",groups={OmcOldManSupValidator.class})
    private String psHistory;

    /**
     * 体重
     */
    @Size(min=1,max=20,message="{weight.length}",groups={OmcOldManSupValidator.class})
    private String weight;

    /**
     * 身高
     */
    @Size(min=1,max=20,message="{height.length}",groups={OmcOldManSupValidator.class})
    private String height;

    /**
     * 社保卡号
     */
    @NotNull(message="{OldMan.shebaoka.notnull}",groups={OmcOldManSupValidator.class})
    @Pattern(regexp = "^([1-9]\\d{5}(18|19|([23]\\d))\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3}[0-9Xx])|(([1-9]\\d{5}\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{2}[0-9Xx]))$",message = "{OldMan.ssCard.error}", groups = { OmcOldManSupValidator.class })
    private String ssCard;

    /**
     * 人员类别ID
     */
    @NotNull(message="{OldMan.personType.notnull}",groups={OmcOldManSupValidator.class})
    private Long peopleType;

    /**
     * 宗教信仰1-无2-佛教3-道教4-伊斯兰教5-基督教
     */
    @NotNull(message="{OldMan.zongjian.notnull}",groups={OmcOldManSupValidator.class})
    @Range(min=1,max=5,message="{OldMan.zongjian.range.error}",groups={OmcOldManSupValidator.class})
    private Integer religion;


    /**
     * 自理能力1-自理2-半自理3-失能
     */
    @NotNull(message="{OldMan.zilinegli.notnull}",groups={OmcOldManSupValidator.class})
    @Range(min=1,max=3,message="{OldMan.zilinegli.range.errors}",groups={OmcOldManSupValidator.class})
    private Integer selfcareStatus;

    /**
     * 是否残疾 0-否 1-是
     */
    @NotNull(message="{OldMan.canji.notnull}",groups={OmcOldManSupValidator.class})
    @Range(min=0,max=1,message="{OldMan.canji.range.error}",groups={OmcOldManSupValidator.class})
    private Integer isDisabled;

    /**
     * 残疾证编号
     */
    @NotNull(message="{Examine.shifou.code.notnull}",groups={OmcOldManSupValidator.class})
    @Pattern(regexp = "^[1-9]\\d{7}((0\\d)|(1[0-2]))(([0|1|2]\\d)|3[0-1])\\d{3}$|^[1-9]\\d{5}[1-9]\\d{3}"
            + "((0\\d)|(1[0-2]))(([0|1|2]\\d)|3[0-1])\\d{3}([0-9]|X)[1-7][1-4]$",message = "{OldMan.canji.code.pattem.error}", groups = { OmcOldManSupValidator.class })
    private String disabledNo;

    /**
     * 精神残疾等级1-一级2-二级3-三级4-四级
     */
    @NotNull(message="{Examine.jingshencanjki.notnull}",groups={OmcOldManSupValidator.class})
    @Range(min=1,max=4,message="{Examine.canji.level.range.error}",groups={OmcOldManSupValidator.class})
    private Integer sDisabledLevel;

    /**
     * 肢体残疾等级1-一级2-二级3-三级4-四级
     */
    @NotNull(message="{Examine.zhiti.level.notnull}",groups={OmcOldManSupValidator.class})
    @Range(min=1,max=4,message="{Examine.zhiti.level.range.error}",groups={OmcOldManSupValidator.class})
    private Integer bDisabledLevel;

    /**
     * 混合残疾等级
     */
    @NotNull(message="{OldMan.hunhe.canji.level.notnull}",groups={OmcOldManSupValidator.class})
    @Range(min=1,max=4,message="{OldMan.hunhe.canji.level.range.error}",groups={OmcOldManSupValidator.class})
    private Integer sdDisabledLevel;

    /**
     * 原工作单位
     */
    @NotEmpty(message="{OldMan.yuandanwei.notnull}",groups={OmcOldManSupValidator.class})
    @Size(min=1,max=128,message="{OldMan.yuandanwei.length}",groups={OmcOldManSupValidator.class})
    private String oCompany;

    /**
     * 原工作单位联系人
     */
    @NotEmpty(message="{OldMan.yuandanwei.ren.notnull}",groups={OmcOldManSupValidator.class})
    @Size(min=1,max=20,message="{OldMan.yuandanwei.ren.length}",groups={OmcOldManSupValidator.class})
    private String ocContact;

    /**
     * 原工作单位联系方式
     */
    @NotEmpty(message = "{OldMan.yuandanwei.phone.notnull}", groups = { OmcOldManSupValidator.class })
    @Pattern(regexp="^(0\\d{2,3}\\d{7,8})|([1][3,4,5,7,8][0-9]{9})$",message="{OldMan.yuandanwei.phone.pattem.error}",groups={OmcOldManSupValidator.class})
    private String ocPhone;

    /**
     * 原户籍所属街道社区
     */
    @NotEmpty(message="{OldMan.huji.notnull}",groups={OmcOldManSupValidator.class})
    @Size(min=1,max=128,message="{OldMan.huji.length}",groups={OmcOldManSupValidator.class})
    private String oCommunity;

    /**
     * 现籍社区联系电话
     */
    @NotEmpty(message = "{OldMan.jiedao.notnull}", groups = { OmcOldManSupValidator.class })
    @Pattern(regexp="^(0\\d{2,3}\\d{7,8})|([1][3,4,5,7,8][0-9]{9})$",message="{OldMan.jiedao.pattem.error}",groups={OmcOldManSupValidator.class})
    private String cComphone;

    /**
     * 现户籍所属街道社区
     */
    @NotEmpty(message="{OldMan.xianhuji.notnull}",groups={OmcOldManSupValidator.class})
    @Size(min=1,max=128,message="{OldMan.xianhuji.length}",groups={OmcOldManSupValidator.class})
    private String cCommunity;

    /**
     * 亲属联系电话
     */
    @NotEmpty(message = "{OldMan.qinshu.phone.notnull}", groups = { OmcOldManSupValidator.class })
    @Pattern(regexp="^(0\\d{2,3}\\d{7,8})|([1][3,4,5,7,8][0-9]{9})$",message="{OldMan.qinshu.phone.pattem.error}",groups={OmcOldManSupValidator.class})
    private String relativePhone;

    /**
     * 是否保留骨灰0-否1-是
     */
    @NotNull(message="{OldMan.baoliuguhui.notnull}",groups={OmcOldManSupValidator.class})
    @Range(min=0,max=1,message="{OldMan.baoliuguhui.range.error}",groups={OmcOldManSupValidator.class})
    private Integer isKeepAshes;

    /**
     * 是否捐赠遗体0-否1-是
     */
    @NotNull(message="{OldMan.juanzeng.notnull}",groups={OmcOldManSupValidator.class})
    @Range(min=0,max=1,message="{OldMan.juanzeng.range.error}",groups={OmcOldManSupValidator.class})
    private Integer isDonate;

    /**
     * 去世时间 2018-04-27
     */
    @Pattern(regexp = "^(?:(?!0000)[0-9]{4}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-8])"
            + "|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[0-9]{2}(?:0[48]|"
            + "[2468][048]|[13579][26])|(?:0[48]|[2468][048]|[13579][26])00)-02-29)$", message = "{Advisory.date.pattem.error}", groups = { OmcOldManSupValidator.class })
    private String deadTime;

    /**
     * 去世原因
     */
    @NotEmpty(message="{OldMan.qushireason.notnull}",groups={OmcOldManSupValidator.class})
    @Size(min=1,max=1024,message="{OldMan.qushireason.length}",groups={OmcOldManSupValidator.class})
    private String deadReason;

    /**
     * 特殊饮食
     */
    @NotEmpty(message="{OldMan.yinshiyaoqiu.notnull}",groups={OmcOldManSupValidator.class})
    @Size(min=1,max=128,message="{OldMan.yinshiyaoqiu.length}",groups={OmcOldManSupValidator.class})
    private String specialDiet;

    /**
     * 饮食其它
     */
    @Column(name = "other_diet")
    private String otherDiet;

    /**
     * 申请人姓名
     */
    @Size(min=1,max=20,message="{OldMan.shenqing.name.range.error}",groups={OmcOldManSupValidator.class})
    private String egName;

    /**
     * 申请人电话
     */
    @Pattern(regexp="^(0\\d{2,3}\\d{7,8})|([1][3,4,5,7,8][0-9]{9})$",message="{OldMan.shenqing.pattem.error}",groups={OmcOldManSupValidator.class})
    private String egPhone;

    /**
     * 申请人性别0-男1-女
     */
    @NotNull(message="{OldManjinji.sex.notnull}",groups={OmcOldManSupValidator.class})
    @Range(min=0,max=1,message="{OldManjinji.sex.range.error}",groups={OmcOldManSupValidator.class})
    private Integer egSex;

    /**
     * 申请人身份证号
     */
    @NotNull(message="{OldMan.jalsjldfg.notnull}",groups={OmcOldManSupValidator.class})
    @Pattern(regexp = "^([1-9]\\d{5}(18|19|([23]\\d))\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3}[0-9Xx])|(([1-9]\\d{5}\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{2}[0-9Xx]))$",message = "{OldMan.jalsjldfg.range.error}", groups = { OmcOldManSupValidator.class })
    private String egIdCard;

    /**
     * 申请人工作单位
     */
    @NotEmpty(message="{OldMan.hahfqre.notnull}",groups={OmcOldManSupValidator.class})
    @Size(min=1,max=128,message="{OldMan.hahfqre.length}",groups={OmcOldManSupValidator.class})
    private String egCompany;

    /**
     * 申请人邮箱
     */
    @NotEmpty(message="{OldMan.audsfjgk.notnull}",groups={OmcOldManSupValidator.class})
    @Pattern(regexp="^^[A-Za-z0-9\\u4e00-\\u9fa5]+@[a-zA-Z0-9_-]+(\\.[a-zA-Z0-9_-]+)+$",message="{OldMan.audsfjgk.pattem.error}",groups={OmcOldManSupValidator.class})
    private String email;

    /**
     * 申请人住址
     */
    @NotEmpty(message="{OldMan.unbsdf.notnull}",groups={OmcOldManSupValidator.class})
    @Size(min=1,max=128,message="{OldMan.unbsdf.length}",groups={OmcOldManSupValidator.class})
    private String egAddress;

    /**
     * 备用联系人b
     */
    @NotEmpty(message="{OldMan.yadsbfwae.notnull}",groups={OmcOldManSupValidator.class})
    @Size(min=1,max=20,message="{OldMan.yauwiebsdf.length}",groups={OmcOldManSupValidator.class})
    private String anContactB;

    /**
     * 备用联系人b联系方式
     */
    @NotEmpty(message="{OldMan.asdfoiwenfs.notnull}", groups={OmcOldManSupValidator.class})
    @Pattern(regexp="^(0\\d{2,3}\\d{7,8})|([1][3,4,5,7,8][0-9]{9})$",message="{OldMan.asdfoiwenfs.pattem.error}",groups={OmcOldManSupValidator.class})
    private String anPhoneB;

    /**
     * 特殊说明
     */
    @NotEmpty(message="{OldMan.ywebrfsd.notnull}",groups={OmcOldManSupValidator.class})
    @Size(min=1,max=10,message="{OldMan.ywebrfsd.length}",groups={OmcOldManSupValidator.class})
    private String specialCase;

    /**
     * 头像
     */
    @NotNull(message="{OldMan.touxiangid.notnull}",groups={OmcOldManSupValidator.class})
    @Range(min=1,max=9223372036854775807L,message="{OldMan.touxiangid.range.error}",groups={OmcOldManSupValidator.class})
    private Long headPic;
    /**
     * 入院时间 2018-02-15
     */
    @Pattern(regexp="^(?:(?!0000)[0-9]{4}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-8])"
            + "|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[0-9]{2}(?:0[48]|"
            + "[2468][048]|[13579][26])|(?:0[48]|[2468][048]|[13579][26])00)-02-29)$",
            message="{Advisory.date.pattem.error}",
            groups={OmcOldManSupValidator.class})
    private String inDate;

    /**
     * 是否缴费 0-未缴费 1-已缴费
     */
    @NotNull(message="{OldMan.shifoujiaofei.notnull}",groups={OmcOldManSupValidator.class})
    @Range(min=0,max=1,message="{OldMan.shifoujiaofei.range.error}",groups={OmcOldManSupValidator.class})
    private Integer isPayed;

    /**
     * 合同编号
     */
    private Long contractNo;

    /**
     * 入住押金编号
     */
    @NotEmpty(message="{OldManiouwenfsd.notnull}",groups={OmcOldManSupValidator.class})
    @Size(min=1,max=20,message="{OldManiouwenfsd.length}",groups={OmcOldManSupValidator.class})
    private String inEpositNo;

    /**
     * 入住押金收退款状态 0-未退  1-已退
     */
    @NotNull(message="{OldMan.hkjashdfwe.notnull}",groups={OmcOldManSupValidator.class})
    @Range(min=0,max=1,message="{OldMan.hkjashdfwe.range.error}",groups={OmcOldManSupValidator.class})
    private Integer inDepositStatus;

    /**
     * 门禁卡id
     */
    private Integer cardId;

    /**
     * 老人身份证图片
     */
    @Range(min=0,max=300,message="{OldMan.idCard.pic.range.error}",groups={OmcOldManSupValidator.class})
    private String idCardPic;

    /**
     * 老人出院小结图片
     */
    @Range(min=0,max=300,message="{OldMan.out.pic.range.error}",groups={OmcOldManSupValidator.class})
    private String outPic;

    /**
     * 其他图片
     */
    @Range(min=0,max=300,message="{OldMan.other.pic.range.error}",groups={OmcOldManSupValidator.class})
    private String otherPic;

    /**
     * 申请人与修养人关系 1-子女 2-兄弟姐妹 3-旁系亲属 4-朋友 5-其他
     */
    @Range(min=1,max=5,message="{OldMan.relation.ship.pic.range.error}",groups={OmcOldManSupValidator.class})
    private Integer relationShip;

    /**
     * 创建人
     */
    private String creator;

    /**
     * 创建人ID
     */
    private Long creatorId;

    /**
     * 创建时间
     */
    private Date createdTime;

    /**
     * 最近操作人
     */
    private String lastOperator;

    /**
     * 最后操作人ID
     */
    private Long lastOperatorId;

    /**
     * 更新时间
     */
    private Date updateTime;

    /**
     * 备注
     */
    private String remark;

    /**
     * 出院原因
     */
    private String outReason;

    /*
    * 咨询记录id
    * */
    private Long advisoryId;
}